package com.platform.api.bzproject.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.platform.api.bzproject.model.BzTags;
import com.platform.api.bzproject.service.IBzTagsService;
import com.platform.common.core.Result;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 标签表 前端控制器
 * </p>
 *
 * @author guoshao
 * @since 2021-10-26
 * 源码联系微信：2549789059
 */
@RestController
@RequestMapping("{appid}/tags")
public class BzTagsController {

    @Autowired
    private IBzTagsService iBzTagsService;


    @ApiOperation(value = "壁纸标签表", notes="壁纸标签表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "appid", value = "小程序appid", required = true, dataType = "String"),
    })
    @GetMapping("list")
    private Result getTags(){
        List<BzTags> list = iBzTagsService.list(new QueryWrapper<BzTags>().eq("status", 1));
        return Result.success(list);
    }


}
